﻿/*
 * 2023/3/25
 * 日志模型（添加了级别、主机、端口、内容）
 * 
 * **/
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Max.Ph5_2009A.NewShopping.Domain
{
    [Table("SystemLog")]
    public class SystemLogModel : AudtiField<Guid>
    {
        /// <summary>
        /// 日志级别
        /// </summary>
        public SystemLogLevel Level { get; set; } = SystemLogLevel.Info;

        /// <summary>
        /// 客户IP
        /// </summary>
        public string? Ip { get; set; }

        /// <summary>
        /// 客户浏览器
        /// </summary>
        public string? Browe { get; set; }

        /// <summary>
        /// 访问路径
        /// </summary>
        public string? Path { get; set; }

        /// <summary>
        /// 主机
        /// </summary>
        public string? Host { get; set; }


        /// <summary>
        /// 端口
        /// </summary>
        public string? Port { get; set; }

        /// <summary>
        /// 客户用户
        /// </summary>
        public string? User { get; set; }

        /// <summary>
        /// 内容 - 客户做了什么事
        /// </summary>
        public string? Context { get; set; }
    }

    public enum SystemLogLevel
    {
        Info,
        Debug,
        Warn,
        Error,
        Fatal,
        Other
    }
}
